package com.spring.ai.assistant;

import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.spring.AiService;
import reactor.core.publisher.Flux;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

/**
 * 大模型流式接口
 */
@AiService(wiringMode = EXPLICIT, streamingChatModel = "qwenStreamingChatModel",
        chatMemoryProvider = "chatMemoryProviderKongMen",
        tools = "kongMengAgentTools",
        contentRetriever = "contentRetrieverEmbedding"
)
public interface KongMengStreamAgent {
    @SystemMessage(fromResource = "medical_template.text")
    Flux<String> chat(@MemoryId Long memoryId, @UserMessage String message);
}
